package com.csun.cmny.provider.service;

import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.UacGroupRole;
import com.csun.cmny.provider.model.domain.UacRole;
import com.csun.cmny.provider.model.dto.group.GroupRoleDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-07-21 13:04
 * @Description: the interface uac group role service
 */
public interface UacGroupRoleService extends IService<UacGroupRole> {

    /**
     * 批量添加机构角色
     *
     * @param groupId       the group id
     * @param roleIdList    the role id list
     *
     * @return  the int.
     */
    Integer batchSaveGroupRole(Long groupId, List<Long> roleIdList);

    /**
     * 根据机构Id查询角色列表
     *
     * @param groupId   the group id
     *
     * @return  the list.
     */
    List<UacRole> queryRoleListByGroupId(Long groupId);

    /**
     * 绑定机构角色
     *
     * @param groupRoleDto  the group role dto
     *
     * @return  the int.
     */
    Integer assignGroupRole(GroupRoleDto groupRoleDto);

    /**
     * 移除机构角色
     *
     * @param groupRoleDto  the group role dto
     *
     * @return  the int.
     */
    Integer deleteGroupRole(GroupRoleDto groupRoleDto);

    /**
     * query not bind role list by group id
     *
     * @param groupId   the group id
     *
     * @return  the list.
     */
    List<UacRole> queryNotBindRoleListByGroupId(Long groupId);
}
